package UMC_GC;

public class Example {
    String multiply(String x, int n) {
        if (n <= 0) return "";
        StringBuffer buf = new StringBuffer();
        while (n-- > 0) {
            buf.append(x);
        }
        return buf.toString();
    }
    String multiplyGc(String x, int n) {
        System.gc(); // see perfromance resutlts if run this test
        return multiply(x, n);
    }

}
